SpatialStream® Code Examples

Adding Parcel WMS Layer

Creating a Map Layer Object and adding it to the map is the SpatialStream® recommended method.
The example below shows how to construct a Map Layer Object to add a Parcel layer (WMS) to the map.
The Map Layer Object constructs the GetMap requests which retrieves the images for overlaying on the map.

GetMap

layer = new Dmp.Layer.WmsLayer("wmsLayer", "SS", {
zIndex: 3
});
layer.addChild(
"wmsRes",
"samplesite.dmp/parcels",
"samplesite.dmp.Styles.Parcels/Default.sld.xml",
{
zoomRange: {
min: 15, max: 19
}
}
);
layer.setMap(map);

// need to do this on the first load.
setTimeout(function () {

layer.refresh();
}, 1000);


Run Sample   Back To Index